package com.mdd.admin.validate.subject;

import com.mdd.admin.validate.BaseParam;
import com.mdd.common.validator.annotation.IDMust;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 专题专区课程参数
 * @author panweiliang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SubjectCourseBatchParam extends BaseParam {

    @IDMust(message = "id参数必传且需大于0", groups = {update.class})
    private Integer id;

    @NotNull(message = "subjectId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "subjectId参数值不能少于0", groups = {create.class, update.class, delete.class})
    private Integer subjectId;

    @NotNull(message = "courseIds参数缺失", groups = {create.class, update.class})
    @NotEmpty(message = "请选择课程", groups = {create.class, update.class})
    private List<Integer> courseIds;

}
